package lab02.test30;

import java.util.ArrayList;
import java.util.Scanner;

public class Test30 {
    public static void main(String[] args) {


        float sum = 0,average;
        Scanner scanner = new Scanner(System.in);
        ArrayList<Float> score = new ArrayList<Float>();
        System.out.println("请输入5位同学的成绩：");
        for (int i = 0;i < 5;i++) {
            score.add(scanner.nextFloat());
        }

        for (float n : score) {
            sum += n;
        }

        System.out.println("平均成绩为：" + sum/score.size());

    }
}
